package items;

import flixel.FlxSprite;
import flixel.FlxG;


class Diskette extends FlxSprite
{
	public var id(default, null): Int;
	private var _time: Float = 0;
	private var _yBase: Float;


	public function new(Id: Int, X: Float, Y: Float)
	{
		super(X + 4, Y + 4, "assets/img/diskette.png");
		id = Id;
		width = height = 8;
		offset.x = offset.y = 4;
		_yBase = y;
		//FlxG.sound.load("assets/sound/beepy-kick.wav");
	}

	override public function update()
	{
		_time += FlxG.elapsed;
		scale.x = Math.sin(2 * _time);
		y = _yBase + 4 * Math.sin(3 * _time);
	}

	override public function kill()
	{
		super.kill();
		FlxG.sound.play("assets/sounds/beepy-kick.mp3");
	}


}